package com.example.commons.utils;

import org.quartz.*;

@DisallowConcurrentExecution
public class HomeworkReleaseJob implements Job {
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        JobDataMap data = context.getMergedJobDataMap();
        Long homeworkId = data.getLong("homeworkId");

        // 这里可以调用你的服务方法，比如发送邮件通知学生等
        System.out.println("作业 " + homeworkId + " 已经发布");
    }
}